|
![](/i/fill.gif) |
I cannot get the following code to work:
//-----------------------------
#macro sign(a)
#if (a<0)
(-a)
#else
(a)
#end
#end
#macro ease_in(your_clock,your_array)
#local rotdim=dimension_size(your_array,1);
#local ennn=0;
#while(ennn<rotdim)
#if(your_array[ennn].x=your_clock)
(<your_array[ennn].y,your_array[ennn].z,your_array[ennn].t>)
#declare ennn=ennn+1e7;
#else
#if(your_array[ennn].x<your_clock)
#local ennn=ennn+1;
#else
#local why1=your_array[ennn+0];
#local why0=your_array[ennn-1];
#local
teee=(your_clock-why0.x)/(why1.x-why0.x);
#local
teeecubes=0.5-0.5*pow(abs(cos(teee*pi)),0.5)*sign(cos(teee*pi));
#local
exxx=why0.y+(why1.y-why0.y)*teeecubes;
#local
eyyy=why0.z+(why1.z-why0.z)*teeecubes;
#local
ezzz=why0.t+(why1.t-why0.t)*teeecubes;
#declare ennn=ennn+1e7;
(<exxx,eyyy,ezzz>)
#end
#end
#end
#end
#declare ary=array[3]{
//an array of four dimensions:
//< time, x_position[n], y_position[n], z_position[n]>
<0.00, -16,47,24>,
<0.50, 0,52,-0>,
<1.00, -16,47,24>
}
//sorry for the mess here!
#declare ltempwristpt=<0,0,0>+(ease_in(clock,ary));
sphere{ltempwristpt,1 pigment{red 1}}
Post a reply to this message
|
![](/i/fill.gif) |